package to;


public class HistoryTO {
	private int no;
	private String memberPhone;
	private String driverPhone;
	private String rideDate;
	private String rating;
	private String ratingComment;
	
	public HistoryTO(){}

	public HistoryTO(int no, String memberPhone, String driverPhone,
			String rideDate, String rating, String ratingComment) {
		super();
		this.no = no;
		this.memberPhone = memberPhone;
		this.driverPhone = driverPhone;
		this.rideDate = rideDate;
		this.rating = rating;
		this.ratingComment = ratingComment;
	}

	public int getNo() {
		return no;
	}

	public void setNo(int no) {
		this.no = no;
	}

	public String getMemberPhone() {
		return memberPhone;
	}

	public void setMemberPhone(String memberPhone) {
		this.memberPhone = memberPhone;
	}

	public String getDriverPhone() {
		return driverPhone;
	}

	public void setDriverPhone(String driverPhone) {
		this.driverPhone = driverPhone;
	}

	public String getRideDate() {
		return rideDate;
	}

	public void setRideDate(String rideDate) {
		this.rideDate = rideDate;
	}

	public String getRating() {
		return rating;
	}

	public void setRating(String rating) {
		this.rating = rating;
	}

	public String getRatingComment() {
		return ratingComment;
	}

	public void setRatingComment(String ratingComment) {
		this.ratingComment = ratingComment;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((driverPhone == null) ? 0 : driverPhone.hashCode());
		result = prime * result
				+ ((memberPhone == null) ? 0 : memberPhone.hashCode());
		result = prime * result + no;
		result = prime * result + ((rating == null) ? 0 : rating.hashCode());
		result = prime * result
				+ ((ratingComment == null) ? 0 : ratingComment.hashCode());
		result = prime * result
				+ ((rideDate == null) ? 0 : rideDate.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		HistoryTO other = (HistoryTO) obj;
		if (driverPhone == null) {
			if (other.driverPhone != null)
				return false;
		} else if (!driverPhone.equals(other.driverPhone))
			return false;
		if (memberPhone == null) {
			if (other.memberPhone != null)
				return false;
		} else if (!memberPhone.equals(other.memberPhone))
			return false;
		if (no != other.no)
			return false;
		if (rating == null) {
			if (other.rating != null)
				return false;
		} else if (!rating.equals(other.rating))
			return false;
		if (ratingComment == null) {
			if (other.ratingComment != null)
				return false;
		} else if (!ratingComment.equals(other.ratingComment))
			return false;
		if (rideDate == null) {
			if (other.rideDate != null)
				return false;
		} else if (!rideDate.equals(other.rideDate))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "HistoryTO [no=" + no + ", memberPhone=" + memberPhone
				+ ", driverPhone=" + driverPhone + ", rideDate=" + rideDate
				+ ", rating=" + rating + ", ratingComment=" + ratingComment
				+ "]";
	}
}
